

class SplashArgs(object):

    wuba_info = """
    function main(splash, args)
        assert(splash:go(args.url))
          splash.images_enabled = false
          local execute = splash:evaljs("$('.displayphonenumber').click()")
          local phone = splash:evaljs("document.getElementsByClassName('phone')[0].innerHTML")
          local detail = splash:evaljs("$('.con ul')[0].innerText")
          local title = splash:evaljs("$('.d-top-head h1')[0].innerText")
          local city = splash:evaljs("$('.fc-city')[0].innerText")
          return {
            title,
            phone,
            detail,
            city
          }
        end
    """

    fuwu_dian = """
        function main(splash, args)
          assert(splash:go(args.url))
          splash.images_enabled = false
          local execute = splash:evaljs("$('.displayphonenumber').click()")
          local phone = splash:evaljs("document.getElementsByClassName('phone')[0].innerHTML")
          local detail = splash:evaljs("$('.d-top-info ul')[0].innerText")
          local title = splash:evaljs("$('.d-top-head h1')[0].innerText")
          local city = splash:evaljs("$('.fc-city')[0].innerText")
          return {
            title,
            phone,
            detail,
            city
          }
        end
    """